var parentJson = {};
parentJson.bakUrl="http://localhost:8081/unite_platform/meeting_info/toSelect";
parentJson.jsType="add";
parentJson.parameter="";
parentJson.showType="";
var now = getNowFormatDateTime(); 
var username = sessionStorage.getItem("name");
var userid = sessionStorage.getItem("userId");
var repairid=GetQueryString("repairid");
var flag=GetQueryString("flag");
var photoUrl = [];//拍照列表
var _config ;
var star_attitude = 0;
var star_speed = 0;
var star_cost = 0; 
$(document).ready(function(){
	if(flag=='4' || flag=='3'){
		//$('#advice')[0].style.display="none";
		$('#detail1')[0].style.display="";
		$('#detail')[0].style.display="";
	}else if(flag=='1' || flag=='21'|| flag=='22'){
		$('#detail')[0].style.display="none";
		$('#detail1')[0].style.display="none";
	}else{
		$('#advice')[0].style.display="";
		$('#detail')[0].style.display="";
		$('#detail1')[0].style.display="";
	}
	$("#username").prepend(username);
	$("#repairid").append(repairid);
	$.ajax({
			url: '../../repair_info/weixiu_fill'
			,type:'post'
			,dataType:'json'
			,contentType: "application/json; charset=utf-8"
			,data:JSON.stringify({"repairid":repairid})  
			,success: function(res){
				console.log(res.data);
				var resdata = res.data[0];
					$('#tel').append(resdata.tel);
					$('#repairtype').append(resdata.name);	
					$('#repairdate').append(resdata.repairdate);		
					$('#instruction').append(resdata.instruction);
					$('#paidansj').append(resdata.paidansj);			
					$('#acceptdate').append(resdata.acceptdate);
					$('#finishdate').append(resdata.finishdate);
					$('#confirmdate').append(resdata.confirmdate);
					$('#cost').append(Number(resdata.cost_parts)+Number(resdata.cost_worker));
					$('#wxys').append(formatCurrencyFixed1(Number(getHourChaBetween(resdata.acceptdate,resdata.finishdate))));
					$('#plan').append(resdata.plan);
					$('#qita').append(resdata.qita);
					$('#parts').append(resdata.parts);
					$('#dutyuser').append(resdata.dutyuser);
					star_attitude =Number(resdata.star_attitude);
					star_speed =Number(resdata.star_speed);
					star_cost= Number(resdata.star_cost);
				/*	$('#repairdate').append(resdata.repairdate);
					$('#shopcode').append(resdata.shopcode);
					$('#shopname').append(resdata.deptname);
					
*/							layui.use(['rate'], function(){
			  var rate = layui.rate;
			  //显示文字
			  rate.render({
			    elem: '#attitude'
			    ,value: star_attitude//初始值
			    ,text: true //开启文本
 				,readonly: true
			  });
	 		  rate.render({
			    elem: '#speed'
			    ,value: star_speed //初始值
			    ,text: true //开启文本
 				,readonly: true
			  });
	 			rate.render({
			    elem: '#reasonable'
			    ,value: star_cost //初始值
			    ,text: true //开启文本
 				,readonly: true
			  });
			});
					
			}
	});
	

			
});
